﻿namespace CodingExercises._1_25;

public class CalculateTotalBreakTime
{
    // 计算多个时间范围的总休息时间
    public static TimeSpan Method(List<(DateTime Start, DateTime End)> breaks)
    {
        TimeSpan total = TimeSpan.Zero;
        foreach (var (start, end) in breaks)
        {
            total += end - start;
        }

        return total;
    }
}